<?php
/**
 * Enter description here ...
 * @author Micou13630
 *
 */
class Img extends StatefulCanvas implements IRenderable {
	protected $src;
	protected $name;
	
	protected $imageType;
	protected $imageWidth;
	protected $imageHeight;
	protected $size;
	
	protected $showTitle;
	
	protected $activeAreaHTML;
	protected $usePNGFix;
	
	/**
	 * Constructeur
	 * @param unknown_type $id
	 * @param unknown_type $src
	 * @param unknown_type $width
	 * @param unknown_type $height
	 */
	public function Img($id, $src, $width = null, $height = null) {
		parent::StatefulCanvas($id);
		
		$this->src = $src;
		$this->imageWidth = $width;
		$this->imageHeight = $height;
	}
	
	
	/**
	 * Implementation de object
	 * @see IRenderable::object()
	 */
	public function object() {
		return get_class($this);
	}

	/**
	 * Implementation de properties
	 * @see IRenderable::properties()
	 */
	public function properties() {
		return parent::getProp($this);
	}
	
	/**
	 * Implementation de scLog
	 * @see IRenderable::scLog()
	 */
	public function scLog() {
		ScCollectionLog::getInstance()->addSc(new ScLog($this->object(), get_object_vars($this)));
	}

	/**
	 * Implementation de render
	 * @see IScreen::render()
	 */
	public function render() {
		$this->scLog();
		return "isc.".$this->object().".create({".$this->properties()."})";
	}
}
?>
